package cglib;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class MethodInterceptorImpl implements MethodInterceptor {

    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        System.out.println("before1");
//        Object invoke = methodProxy.invoke(o, objects);
        Object invoke = methodProxy.invokeSuper(o, objects);
        System.out.println("after1");
        return invoke;
    }
}
